import java.io.*;
import java.nio.charset.StandardCharsets;

public class Bufferoutputstream_1 {
    public static void main(String[] args) throws IOException {
        BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream("src//fos.txt"));
        fos.write("abcesews".getBytes(StandardCharsets.UTF_8));
        fos.close();
        BufferedInputStream cos = new BufferedInputStream(new FileInputStream("src//fos.txt"));
        int by;
        while ((by=cos.read())!=-1){
            System.out.print((char) by);
        }


        cos.close();


    }
}
